package com.javaee6.liimp.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class EnergencyplanExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public EnergencyplanExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andPlanidIsNull() {
            addCriterion("planId is null");
            return (Criteria) this;
        }

        public Criteria andPlanidIsNotNull() {
            addCriterion("planId is not null");
            return (Criteria) this;
        }

        public Criteria andPlanidEqualTo(Integer value) {
            addCriterion("planId =", value, "planid");
            return (Criteria) this;
        }

        public Criteria andPlanidNotEqualTo(Integer value) {
            addCriterion("planId <>", value, "planid");
            return (Criteria) this;
        }

        public Criteria andPlanidGreaterThan(Integer value) {
            addCriterion("planId >", value, "planid");
            return (Criteria) this;
        }

        public Criteria andPlanidGreaterThanOrEqualTo(Integer value) {
            addCriterion("planId >=", value, "planid");
            return (Criteria) this;
        }

        public Criteria andPlanidLessThan(Integer value) {
            addCriterion("planId <", value, "planid");
            return (Criteria) this;
        }

        public Criteria andPlanidLessThanOrEqualTo(Integer value) {
            addCriterion("planId <=", value, "planid");
            return (Criteria) this;
        }

        public Criteria andPlanidIn(List<Integer> values) {
            addCriterion("planId in", values, "planid");
            return (Criteria) this;
        }

        public Criteria andPlanidNotIn(List<Integer> values) {
            addCriterion("planId not in", values, "planid");
            return (Criteria) this;
        }

        public Criteria andPlanidBetween(Integer value1, Integer value2) {
            addCriterion("planId between", value1, value2, "planid");
            return (Criteria) this;
        }

        public Criteria andPlanidNotBetween(Integer value1, Integer value2) {
            addCriterion("planId not between", value1, value2, "planid");
            return (Criteria) this;
        }

        public Criteria andPlantypeIsNull() {
            addCriterion("planType is null");
            return (Criteria) this;
        }

        public Criteria andPlantypeIsNotNull() {
            addCriterion("planType is not null");
            return (Criteria) this;
        }

        public Criteria andPlantypeEqualTo(String value) {
            addCriterion("planType =", value, "plantype");
            return (Criteria) this;
        }

        public Criteria andPlantypeNotEqualTo(String value) {
            addCriterion("planType <>", value, "plantype");
            return (Criteria) this;
        }

        public Criteria andPlantypeGreaterThan(String value) {
            addCriterion("planType >", value, "plantype");
            return (Criteria) this;
        }

        public Criteria andPlantypeGreaterThanOrEqualTo(String value) {
            addCriterion("planType >=", value, "plantype");
            return (Criteria) this;
        }

        public Criteria andPlantypeLessThan(String value) {
            addCriterion("planType <", value, "plantype");
            return (Criteria) this;
        }

        public Criteria andPlantypeLessThanOrEqualTo(String value) {
            addCriterion("planType <=", value, "plantype");
            return (Criteria) this;
        }

        public Criteria andPlantypeLike(String value) {
            addCriterion("planType like", value, "plantype");
            return (Criteria) this;
        }

        public Criteria andPlantypeNotLike(String value) {
            addCriterion("planType not like", value, "plantype");
            return (Criteria) this;
        }

        public Criteria andPlantypeIn(List<String> values) {
            addCriterion("planType in", values, "plantype");
            return (Criteria) this;
        }

        public Criteria andPlantypeNotIn(List<String> values) {
            addCriterion("planType not in", values, "plantype");
            return (Criteria) this;
        }

        public Criteria andPlantypeBetween(String value1, String value2) {
            addCriterion("planType between", value1, value2, "plantype");
            return (Criteria) this;
        }

        public Criteria andPlantypeNotBetween(String value1, String value2) {
            addCriterion("planType not between", value1, value2, "plantype");
            return (Criteria) this;
        }

        public Criteria andTroubletypeIsNull() {
            addCriterion("troubleType is null");
            return (Criteria) this;
        }

        public Criteria andTroubletypeIsNotNull() {
            addCriterion("troubleType is not null");
            return (Criteria) this;
        }

        public Criteria andTroubletypeEqualTo(String value) {
            addCriterion("troubleType =", value, "troubletype");
            return (Criteria) this;
        }

        public Criteria andTroubletypeNotEqualTo(String value) {
            addCriterion("troubleType <>", value, "troubletype");
            return (Criteria) this;
        }

        public Criteria andTroubletypeGreaterThan(String value) {
            addCriterion("troubleType >", value, "troubletype");
            return (Criteria) this;
        }

        public Criteria andTroubletypeGreaterThanOrEqualTo(String value) {
            addCriterion("troubleType >=", value, "troubletype");
            return (Criteria) this;
        }

        public Criteria andTroubletypeLessThan(String value) {
            addCriterion("troubleType <", value, "troubletype");
            return (Criteria) this;
        }

        public Criteria andTroubletypeLessThanOrEqualTo(String value) {
            addCriterion("troubleType <=", value, "troubletype");
            return (Criteria) this;
        }

        public Criteria andTroubletypeLike(String value) {
            addCriterion("troubleType like", value, "troubletype");
            return (Criteria) this;
        }

        public Criteria andTroubletypeNotLike(String value) {
            addCriterion("troubleType not like", value, "troubletype");
            return (Criteria) this;
        }

        public Criteria andTroubletypeIn(List<String> values) {
            addCriterion("troubleType in", values, "troubletype");
            return (Criteria) this;
        }

        public Criteria andTroubletypeNotIn(List<String> values) {
            addCriterion("troubleType not in", values, "troubletype");
            return (Criteria) this;
        }

        public Criteria andTroubletypeBetween(String value1, String value2) {
            addCriterion("troubleType between", value1, value2, "troubletype");
            return (Criteria) this;
        }

        public Criteria andTroubletypeNotBetween(String value1, String value2) {
            addCriterion("troubleType not between", value1, value2, "troubletype");
            return (Criteria) this;
        }

        public Criteria andEntrytimeIsNull() {
            addCriterion("entryTime is null");
            return (Criteria) this;
        }

        public Criteria andEntrytimeIsNotNull() {
            addCriterion("entryTime is not null");
            return (Criteria) this;
        }

        public Criteria andEntrytimeEqualTo(Date value) {
            addCriterion("entryTime =", value, "entrytime");
            return (Criteria) this;
        }

        public Criteria andEntrytimeNotEqualTo(Date value) {
            addCriterion("entryTime <>", value, "entrytime");
            return (Criteria) this;
        }

        public Criteria andEntrytimeGreaterThan(Date value) {
            addCriterion("entryTime >", value, "entrytime");
            return (Criteria) this;
        }

        public Criteria andEntrytimeGreaterThanOrEqualTo(Date value) {
            addCriterion("entryTime >=", value, "entrytime");
            return (Criteria) this;
        }

        public Criteria andEntrytimeLessThan(Date value) {
            addCriterion("entryTime <", value, "entrytime");
            return (Criteria) this;
        }

        public Criteria andEntrytimeLessThanOrEqualTo(Date value) {
            addCriterion("entryTime <=", value, "entrytime");
            return (Criteria) this;
        }

        public Criteria andEntrytimeIn(List<Date> values) {
            addCriterion("entryTime in", values, "entrytime");
            return (Criteria) this;
        }

        public Criteria andEntrytimeNotIn(List<Date> values) {
            addCriterion("entryTime not in", values, "entrytime");
            return (Criteria) this;
        }

        public Criteria andEntrytimeBetween(Date value1, Date value2) {
            addCriterion("entryTime between", value1, value2, "entrytime");
            return (Criteria) this;
        }

        public Criteria andEntrytimeNotBetween(Date value1, Date value2) {
            addCriterion("entryTime not between", value1, value2, "entrytime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}